package com.danskin.wechat.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import com.danskin.wechat.entity.CrmBrandInfo;

public interface CrmBrandInfoDao {

	/**
	 * 根据mpId查询CRM品牌
	 * @param mpId
	 * @return
	 * @author makunsmac
	 */
	public CrmBrandInfo selectByMpId(@Param("mpId") int mpId);
	
	public CrmBrandInfo selectByBrandId(@Param("brandId") String brandId);
	
	public CrmBrandInfo selectByAppId(@Param("appId") String appId);
	
	
	public Integer save(CrmBrandInfo crmBrandInfo);
	
	/**
	 * 根据ID查询对象
	 * @param Id
	 * @return
	 */
	public CrmBrandInfo selectCrmBrandInfoById(Integer primeKey);
	
	/**
	 * 根据查询对象和分页条件，查询平台用户list
	 * @param crmBrandInfo
	 * @return
	 */
	public List<CrmBrandInfo> selectCrmBrandInfoPageList(@Param("crmBrandInfo")CrmBrandInfo crmBrandInfo, @Param("offset") int offset, @Param("limit") int limit);
	
	/**
	 * 根据查询对象和分页条件，查询平台用户list
	 * @param crmBrandInfo
	 * @return
	 */
	public List<CrmBrandInfo> selectCrmBrandInfoList(CrmBrandInfo crmBrandInfo);
	
	/**
	 * 根据查询对象查询总数
	 * @param crmBrandInfo
	 * @return
	 */
	public int selectCrmBrandInfoPageCount(CrmBrandInfo crmBrandInfo);
	
	
	/**
	 * 新增
	 * @param crmBrandInfo
	 * @return
	 */
	public int insertSelective(CrmBrandInfo crmBrandInfo);
	
	
	/**
	 * 更新用户
	 * @param crmBrandInfo
	 */
	public int updateByPrimaryKeySelective(CrmBrandInfo crmBrandInfo);
	
	/**
	 * 根据用户id删除user
	 * @param id
	 */
	public int deleteCrmBrandInfoById(Integer primeKey);

	public String queryCrmBrandInfo(@Param("mpId")int mpId);
	
	public CrmBrandInfo selectBrandByCondition(Map<String,Object> map);
	
}
